#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)

#include <stdio.h>

int main()
{
	int arr[] = { 9,8,7,6,5,4,3,2,1,11,10,12,13,14,15,19,18,17,16,20,0 };
	int sz = sizeof(arr) / sizeof(arr[0]);

	int i = 0;
	int k = 0;
	int tmp = 0;

	for (i = 0; i < sz - 1; i++)
	{
		for (k = 0; k < sz - 1 - i; k++)
		{
			if (arr[k] > arr[k + 1])
			{
				tmp = arr[k];
				arr[k] = arr[k + 1];
				arr[k + 1] = tmp;
			}
		}
	}

	for (i = 0; i < sz; i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}